def deadlineComputer(valid_num,time_class):
  '''
  valid_num:有效期的数值 | time_class:有效期的单位\n
  计算有效期截止时间
  '''
  import time
  local_time = time.time()
  start_Time = time.strftime("%Y-%m-%d %H:%M:%S",time.localtime(local_time))
  if time_class == 'hour':
    endTime = local_time + 60*60*valid_num
    return {'startTime':start_Time,'endTime':time.strftime("%Y-%m-%d %H:%M:%S",time.localtime(endTime))}
  elif time_class == 'min':
    endTime = local_time + 60*valid_num
    return {'startTime':start_Time,'endTime':time.strftime("%Y-%m-%d %H:%M:%S",time.localtime(endTime))}
  elif time_class == 'day':
    endTime = local_time + 60*60*24*valid_num
    return {'startTime':start_Time,'endTime':time.strftime("%Y-%m-%d %H:%M:%S",time.localtime(endTime))}